<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul li:nth-child(odd) {
            float: left;
            clear: both;
            width: 100px;
            height: 30px;
            background-color: red;
        }
        
        ul li:nth-child(even) {
            float: right;
            clear: both;
            width: 100px;
            height: 30px;
            background-color: red;
        }
    </style>
</head>

<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
    </ul>
</body>

</html>